﻿
namespace NetROS.Tiers.Windows.Forms
{
	/// <summary>
	/// This is the abstract edit form for the <see cref="Entities.SklDLager"/> entity.
	/// </summary>
	/// <remarks>This class is overwritten by .netTiers at each generation.</remarks>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class SklDLagerEditControlBase : System.Windows.Forms.UserControl
	{
		#region Fields
		
		//private System.Windows.Forms.TableLayoutPanel uxTableLayoutPanel;
		/// <summary>
		/// The ErrorProvider for the Entity;
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxErrorProvider;
		
		/// <summary>
		/// The BindingSource for the entity.
		///</summary>
		protected System.Windows.Forms.BindingSource uxBindingSource;
						
		
		/// <summary>
		/// TextBox for the ID property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxID;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the ID property.
		/// </summary>
		protected System.Windows.Forms.Label uxIDLabel;
		
		/// <summary>
		/// TextBox for the SifraArtikla property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxSifraArtikla;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the SifraArtikla property.
		/// </summary>
		protected System.Windows.Forms.Label uxSifraArtiklaLabel;
		
		/// <summary>
		/// TextBox for the NazivArtikla property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxNazivArtikla;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the NazivArtikla property.
		/// </summary>
		protected System.Windows.Forms.Label uxNazivArtiklaLabel;
		
		/// <summary>
		/// TextBox for the Batch property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxBatch;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Batch property.
		/// </summary>
		protected System.Windows.Forms.Label uxBatchLabel;
		
		/// <summary>
		/// TextBox for the NettoMasa property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxNettoMasa;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the NettoMasa property.
		/// </summary>
		protected System.Windows.Forms.Label uxNettoMasaLabel;
		
		/// <summary>
		/// TextBox for the Kolicina property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxKolicina;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Kolicina property.
		/// </summary>
		protected System.Windows.Forms.Label uxKolicinaLabel;
		
		/// <summary>
		/// TextBox for the Cijena property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxCijena;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Cijena property.
		/// </summary>
		protected System.Windows.Forms.Label uxCijenaLabel;
		
		/// <summary>
		/// TextBox for the Valuta property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxValuta;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Valuta property.
		/// </summary>
		protected System.Windows.Forms.Label uxValutaLabel;
		
		/// <summary>
		/// TextBox for the Porijeklo property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxPorijeklo;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Porijeklo property.
		/// </summary>
		protected System.Windows.Forms.Label uxPorijekloLabel;
		#endregion
		
		#region Main entity
		private Entities.SklDLager _SklDLager;
		/// <summary>
		/// Gets or sets the <see cref="Entities.SklDLager"/> entity to edit with this form.
		/// </summary>
		/// <value>The <see cref="Entities.SklDLager"/> instance.</value>
		public Entities.SklDLager SklDLager
		{
			get {return this._SklDLager;}
			set
			{
				this._SklDLager = value;
				if (value != null) 
				{
					this.uxBindingSource.DataSource = value;
					BindControls();
				}			
				
			}
		}
		#endregion
		
		/// <summary>
		/// Binds the controls.
		/// </summary>
		private void BindControls()
		{
			this.uxID.DataBindings.Clear();
			this.uxID.DataBindings.Add("Text", this.uxBindingSource, "ID", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxSifraArtikla.DataBindings.Clear();
			this.uxSifraArtikla.DataBindings.Add("Text", this.uxBindingSource, "SifraArtikla", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxNazivArtikla.DataBindings.Clear();
			this.uxNazivArtikla.DataBindings.Add("Text", this.uxBindingSource, "NazivArtikla", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxBatch.DataBindings.Clear();
			this.uxBatch.DataBindings.Add("Text", this.uxBindingSource, "Batch", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxNettoMasa.DataBindings.Clear();
			this.uxNettoMasa.DataBindings.Add("Text", this.uxBindingSource, "NettoMasa", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxKolicina.DataBindings.Clear();
			this.uxKolicina.DataBindings.Add("Text", this.uxBindingSource, "Kolicina", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxCijena.DataBindings.Clear();
			this.uxCijena.DataBindings.Add("Text", this.uxBindingSource, "Cijena", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxValuta.DataBindings.Clear();
			this.uxValuta.DataBindings.Add("Text", this.uxBindingSource, "Valuta", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxPorijeklo.DataBindings.Clear();
			this.uxPorijeklo.DataBindings.Add("Text", this.uxBindingSource, "Porijeklo", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
		}					
		
		#region Constructor
		
		/// <summary>
		/// Initializes a new instance of the <see cref="SklDLagerEditControlBase"/> class.
		/// </summary>
		public SklDLagerEditControlBase()
		{
			InitializeComponent();			
			
			this.uxBindingSource.CurrentItemChanged += new System.EventHandler(uxBindingSource_currentItemChanged);
		}		
		
		/// <summary>
		/// 
		/// </summary>
		private void uxBindingSource_currentItemChanged(object sender, System.EventArgs e)
		{
			if (_SklDLager != null) _SklDLager.Validate();
		}	
				
		/// <summary>
		/// Initializes the component.
		/// </summary>
		public void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.uxErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxBindingSource = new System.Windows.Forms.BindingSource(this.components);
			
			//this.uxTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
			this.uxID = new System.Windows.Forms.TextBox();
			uxIDLabel = new System.Windows.Forms.Label();
			this.uxSifraArtikla = new System.Windows.Forms.TextBox();
			uxSifraArtiklaLabel = new System.Windows.Forms.Label();
			this.uxNazivArtikla = new System.Windows.Forms.TextBox();
			uxNazivArtiklaLabel = new System.Windows.Forms.Label();
			this.uxBatch = new System.Windows.Forms.TextBox();
			uxBatchLabel = new System.Windows.Forms.Label();
			this.uxNettoMasa = new System.Windows.Forms.TextBox();
			uxNettoMasaLabel = new System.Windows.Forms.Label();
			this.uxKolicina = new System.Windows.Forms.TextBox();
			uxKolicinaLabel = new System.Windows.Forms.Label();
			this.uxCijena = new System.Windows.Forms.TextBox();
			uxCijenaLabel = new System.Windows.Forms.Label();
			this.uxValuta = new System.Windows.Forms.TextBox();
			uxValutaLabel = new System.Windows.Forms.Label();
			this.uxPorijeklo = new System.Windows.Forms.TextBox();
			uxPorijekloLabel = new System.Windows.Forms.Label();
			
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).BeginInit();
			this.SuspendLayout();
			
			// 
			// uxTableLayoutPanel
			// 
			//this.uxTableLayoutPanel.AutoSize = true;
			//this.uxTableLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			//this.uxTableLayoutPanel.ColumnCount = 2;
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 250F));
			//this.uxTableLayoutPanel.Location = new System.Drawing.System.Drawing.Point(3, 3);
			//this.uxTableLayoutPanel.Name = "uxTableLayoutPanel";
			//this.uxTableLayoutPanel.RowCount = 2;
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.Size = new System.Drawing.Size(450, 50);
			//this.uxTableLayoutPanel.TabIndex = 0;
			
			//
			// uxErrorProvider
			//
			this.uxErrorProvider.ContainerControl = this;
			this.uxErrorProvider.DataSource = this.uxBindingSource;
			
			//
			// uxIDLabel
			//
			this.uxIDLabel.Text = "ID:";
			this.uxIDLabel.Location = new System.Drawing.Point(3, 0);
			this.Controls.Add(this.uxIDLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxIDLabel);			
			//
			// uxID
			//
			this.uxID.ReadOnly = true;
			//this.uxTableLayoutPanel.Controls.Add(this.uxID);
			this.uxID.Location = new System.Drawing.Point(160, 0);
			this.Controls.Add(this.uxID);
			//
			// uxSifraArtiklaLabel
			//
			this.uxSifraArtiklaLabel.Text = "SifraArtikla:";
			this.uxSifraArtiklaLabel.Location = new System.Drawing.Point(3, 26);
			this.Controls.Add(this.uxSifraArtiklaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxSifraArtiklaLabel);			
			//
			// uxSifraArtikla
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxSifraArtikla);
			this.uxSifraArtikla.Location = new System.Drawing.Point(160, 26);
			this.Controls.Add(this.uxSifraArtikla);
			//
			// uxNazivArtiklaLabel
			//
			this.uxNazivArtiklaLabel.Text = "NazivArtikla:";
			this.uxNazivArtiklaLabel.Location = new System.Drawing.Point(3, 52);
			this.Controls.Add(this.uxNazivArtiklaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxNazivArtiklaLabel);			
			//
			// uxNazivArtikla
			//
			this.uxNazivArtikla.Width = 250;
			this.uxNazivArtikla.MaxLength = 250;
			//this.uxTableLayoutPanel.Controls.Add(this.uxNazivArtikla);
			this.uxNazivArtikla.Location = new System.Drawing.Point(160, 52);
			this.Controls.Add(this.uxNazivArtikla);
			//
			// uxBatchLabel
			//
			this.uxBatchLabel.Text = "Batch:";
			this.uxBatchLabel.Location = new System.Drawing.Point(3, 78);
			this.Controls.Add(this.uxBatchLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxBatchLabel);			
			//
			// uxBatch
			//
			this.uxBatch.Width = 250;
			this.uxBatch.MaxLength = 250;
			//this.uxTableLayoutPanel.Controls.Add(this.uxBatch);
			this.uxBatch.Location = new System.Drawing.Point(160, 78);
			this.Controls.Add(this.uxBatch);
			//
			// uxNettoMasaLabel
			//
			this.uxNettoMasaLabel.Text = "NettoMasa:";
			this.uxNettoMasaLabel.Location = new System.Drawing.Point(3, 104);
			this.Controls.Add(this.uxNettoMasaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxNettoMasaLabel);			
			//
			// uxNettoMasa
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxNettoMasa);
			this.uxNettoMasa.Location = new System.Drawing.Point(160, 104);
			this.Controls.Add(this.uxNettoMasa);
			//
			// uxKolicinaLabel
			//
			this.uxKolicinaLabel.Text = "Kolicina:";
			this.uxKolicinaLabel.Location = new System.Drawing.Point(3, 130);
			this.Controls.Add(this.uxKolicinaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxKolicinaLabel);			
			//
			// uxKolicina
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxKolicina);
			this.uxKolicina.Location = new System.Drawing.Point(160, 130);
			this.Controls.Add(this.uxKolicina);
			//
			// uxCijenaLabel
			//
			this.uxCijenaLabel.Text = "Cijena:";
			this.uxCijenaLabel.Location = new System.Drawing.Point(3, 156);
			this.Controls.Add(this.uxCijenaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxCijenaLabel);			
			//
			// uxCijena
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxCijena);
			this.uxCijena.Location = new System.Drawing.Point(160, 156);
			this.Controls.Add(this.uxCijena);
			//
			// uxValutaLabel
			//
			this.uxValutaLabel.Text = "Valuta:";
			this.uxValutaLabel.Location = new System.Drawing.Point(3, 182);
			this.Controls.Add(this.uxValutaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxValutaLabel);			
			//
			// uxValuta
			//
			this.uxValuta.Width = 250;
			this.uxValuta.MaxLength = 50;
			//this.uxTableLayoutPanel.Controls.Add(this.uxValuta);
			this.uxValuta.Location = new System.Drawing.Point(160, 182);
			this.Controls.Add(this.uxValuta);
			//
			// uxPorijekloLabel
			//
			this.uxPorijekloLabel.Text = "Porijeklo:";
			this.uxPorijekloLabel.Location = new System.Drawing.Point(3, 208);
			this.Controls.Add(this.uxPorijekloLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxPorijekloLabel);			
			//
			// uxPorijeklo
			//
			this.uxPorijeklo.Width = 250;
			this.uxPorijeklo.MaxLength = 250;
			//this.uxTableLayoutPanel.Controls.Add(this.uxPorijeklo);
			this.uxPorijeklo.Location = new System.Drawing.Point(160, 208);
			this.Controls.Add(this.uxPorijeklo);
			// 
			// SklDLagerEditControlBase
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			//this.Controls.Add(this.uxTableLayoutPanel);
			this.AutoScroll = true;
			this.Name = "SklDLagerEditControlBase";
			this.Size = new System.Drawing.Size(478, 311);
			//this.Localizable = true;
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).EndInit();			
			this.ResumeLayout(false);
			this.PerformLayout();
		}
		#endregion
				
		#region ComboBox List
		
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	}
}
